import React, { Component } from 'react';
import { View, Text, StyleSheet, Button } from 'react-native';
import NavigationUtil from './NavigationUtil';

export default class Page2 extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text>这是第2个页面</Text>
        <Button title={'点击跳转到First'} onPress={() => {
          NavigationUtil.fromHometoPage("First");
        }} />
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#f0f0f0',
  }
});